/**
 * author: XGP
 * date: 2018/08/2
 * des: 机构树
 */
import request from '@/utils/request'
/**
 * 1 获取机构树，全部数据
 */
export function getOrgTreeApi() {
  return request({
    url: '/orgs/findAll',
    method: 'get'
  })
}

/**
 * 2 新增机构
 */
export function addOrgTreeApi(data) {
  return request({
    url: '/orgs/insert',
    method: 'post',
    data: data
  })
}

/**
 * 3 删除机构
 */
export function deleteOrgTreeApi(orgId) {
  return request({
    url: '/orgs/delete/' + orgId,
    method: 'delete'
  })
}

/**
 * 4 修改机构
 */
export function updateOrgTreeApi(data) {
  return request({
    url: '/orgs/update',
    method: 'put',
    data: data
  })
}
